package com.ruoyi.system.bean.merchant.dto;


import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;
import java.io.Serializable;

@Data
@ApiModel("商家添加/修改参数")
public class AddMerchant  {
    /** $column.columnComment */
    @ApiModelProperty(value = "商家ID", required = true)
    private Long id;


    /** 用户ID */
    @ApiModelProperty(value = "用户ID", required = true)
    @NotNull(message = "用户ID userId 不能为空")
    private Long userId;


    /** 店名 */
    @ApiModelProperty(value = "店名(长度1-30)", required = true)
    @NotBlank(message = "店名 storeName 不能为空")
    @Size(min = 1, max = 30, message = "店名 storeName 长度1-30")
    private String storeName;

    /** 负责人姓名 */
    @ApiModelProperty(value = "负责人姓名(长度1-10)", required = true)
    @NotBlank(message = "负责人姓名 displayName 不能为空")
    @Size(min = 1, max = 10, message = "负责人姓名 displayName 长度1-30")
    private String displayName;

    /** 身份证号 */
    @ApiModelProperty(value = "身份证号(长度1-10)", required = true)
    @Pattern(regexp = "\\d{17}[0-9xX]", message = "身份证号格式不正确")
    @Size(min = 18, max = 18, message = "身份证号必须为18位")
    @NotBlank(message = "身份证号不能为空")
    private String idCard;

    /** 手机号 */
    @ApiModelProperty(value = "手机号(长度1-10)", required = true)
    @Pattern(regexp = "^1[3456789]\\d{9}$|(^(\\d{3,4}-)?\\d{7,8}$)", message = "手机号格式不正确")
    @NotBlank(message = "手机号不能为空")
    private String phone;
}
